package com.lmhy.fisco.contract;

import java.math.BigInteger;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.Future;
import org.bcos.web3j.abi.FunctionEncoder;
import org.bcos.web3j.abi.TypeReference;
import org.bcos.web3j.abi.datatypes.Address;
import org.bcos.web3j.abi.datatypes.Function;
import org.bcos.web3j.abi.datatypes.Type;
import org.bcos.web3j.abi.datatypes.Utf8String;
import org.bcos.web3j.abi.datatypes.generated.Uint256;
import org.bcos.web3j.crypto.Credentials;
import org.bcos.web3j.protocol.Web3j;
import org.bcos.web3j.protocol.core.methods.response.TransactionReceipt;
import org.bcos.web3j.tx.Contract;
import org.bcos.web3j.tx.TransactionManager;

/**
 * Auto generated code.<br>
 * <strong>Do not modify!</strong><br>
 * Please use the <a href="https://docs.web3j.io/command_line.html">web3j command line tools</a>, or {@link org.bcos.web3j.codegen.SolidityFunctionWrapperGenerator} to update.
 *
 * <p>Generated with web3j version none.
 */
public final class LOrder extends Contract {
    private static final String BINARY = "6060604052341561000f57600080fd5b604051610daa380380610daa833981016040528080518201919060200180519060200190919080518201919060200180519060200190919080519060200190919080519060200190919080519060200190919080518201919050508760009080519060200190610080929190610195565b5086600181905550856002908051906020019061009e929190610195565b508460038190555083600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550806007908051906020019061017f929190610195565b506000600981905550505050505050505061023a565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106101d657805160ff1916838001178555610204565b82800160010185558215610204579182015b828111156102035782518255916020019190600101906101e8565b5b5090506102119190610215565b5090565b61023791905b8082111561023357600081600090555060010161021b565b5090565b90565b610b61806102496000396000f3006060604052361561008c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063017e54f61461009157806341be9855146100ee57806346d9d7b51461018e5780635c4b43a9146101b75780636f8b17ca14610300578063c19d93fb14610329578063caf3839714610352578063d1b8031e146104a2575b600080fd5b341561009c57600080fd5b6100ec600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061054b565b005b34156100f957600080fd5b61018c600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061056d565b005b341561019957600080fd5b6101a16108af565b6040518082815260200191505060405180910390f35b34156101c257600080fd5b6101d860048080359060200190919050506108b5565b60405180806020018060200184815260200183810383528681815460018160011615610100020316600290048152602001915080546001816001161561010002031660029004801561026b5780601f106102405761010080835404028352916020019161026b565b820191906000526020600020905b81548152906001019060200180831161024e57829003601f168201915b50508381038252858181546001816001161561010002031660029004815260200191508054600181600116156101000203166002900480156102ee5780601f106102c3576101008083540402835291602001916102ee565b820191906000526020600020905b8154815290600101906020018083116102d157829003601f168201915b50509550505050505060405180910390f35b341561030b57600080fd5b6103136108dd565b6040518082815260200191505060405180910390f35b341561033457600080fd5b61033c6108e3565b6040518082815260200191505060405180910390f35b341561035d57600080fd5b61037360048080359060200190919050506108e9565b60405180806020018060200185815260200184815260200183810383528781815460018160011615610100020316600290048152602001915080546001816001161561010002031660029004801561040c5780601f106103e15761010080835404028352916020019161040c565b820191906000526020600020905b8154815290600101906020018083116103ef57829003601f168201915b505083810382528681815460018160011615610100020316600290048152602001915080546001816001161561010002031660029004801561048f5780601f106104645761010080835404028352916020019161048f565b820191906000526020600020905b81548152906001019060200180831161047257829003601f168201915b5050965050505050505060405180910390f35b34156104ad57600080fd5b610549600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091908035906020019091905050610917565b005b80600890805190602001906105619291906109c7565b50600160098190555050565b6000610577610a47565b600091505b600a548260ff16101561080e57600c60008360ff16815260200190815260200160002060806040519081016040529081600082018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156106445780601f1061061957610100808354040283529160200191610644565b820191906000526020600020905b81548152906001019060200180831161062757829003601f168201915b50505050508152602001600182018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156106e65780601f106106bb576101008083540402835291602001916106e6565b820191906000526020600020905b8154815290600101906020018083116106c957829003601f168201915b50505050508152602001600282015481526020016003820154815250509050836040518082805190602001908083835b60208310151561073b5780518252602082019150602081019050602083039250610716565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390206000191681600001516040518082805190602001908083835b6020831015156107a65780518252602082019150602081019050602083039250610781565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040518091039020600019161415610801576001600c60008460ff1681526020019081526020016000206003018190555061080e565b818060010192505061057c565b60606040519081016040528084815260200185815260200142815250600d6000600b60008154809291906001019190505581526020019081526020016000206000820151816000019080519060200190610869929190610a7c565b506020820151816001019080519060200190610886929190610a7c565b5060408201518160020155905050600b54600a5414156108a95760036009819055505b50505050565b600a5481565b600d602052806000526040600020600091509050806000019080600101908060020154905083565b600b5481565b60095481565b600c602052806000526040600020600091509050806000019080600101908060020154908060030154905084565b6002600954101561092b5760026009819055505b6080604051908101604052808481526020018381526020018281526020016000815250600c6000600a6000815480929190600101919050558152602001908152602001600020600082015181600001908051906020019061098d929190610a7c565b5060208201518160010190805190602001906109aa929190610a7c565b506040820151816002015560608201518160030155905050505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610a0857805160ff1916838001178555610a36565b82800160010185558215610a36579182015b82811115610a35578251825591602001919060010190610a1a565b5b509050610a439190610afc565b5090565b608060405190810160405280610a5b610b21565b8152602001610a68610b21565b815260200160008152602001600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610abd57805160ff1916838001178555610aeb565b82800160010185558215610aeb579182015b82811115610aea578251825591602001919060010190610acf565b5b509050610af89190610afc565b5090565b610b1e91905b80821115610b1a576000816000905550600101610b02565b5090565b90565b6020604051908101604052806000815250905600a165627a7a7230582070c535e7f4a2c8f1c37374b199f835f5b9fe5acc9d1a5592231b7c17c563bd9d0029";

    private LOrder(String contractAddress, Web3j web3j, Credentials credentials, BigInteger gasPrice, BigInteger gasLimit) {
        super(BINARY, contractAddress, web3j, credentials, gasPrice, gasLimit);
    }

    private LOrder(String contractAddress, Web3j web3j, TransactionManager transactionManager, BigInteger gasPrice, BigInteger gasLimit) {
        super(BINARY, contractAddress, web3j, transactionManager, gasPrice, gasLimit);
    }

    public Future<TransactionReceipt> geneYd(Utf8String _ydCode) {
        Function function = new Function("geneYd", Arrays.<Type>asList(_ydCode), Collections.<TypeReference<?>>emptyList());
        return executeTransactionAsync(function);
    }

    public Future<TransactionReceipt> toReceipt(Utf8String _reNo, Utf8String _code) {
        Function function = new Function("toReceipt", Arrays.<Type>asList(_reNo, _code), Collections.<TypeReference<?>>emptyList());
        return executeTransactionAsync(function);
    }

    public Future<Uint256> ydSize() {
        Function function = new Function("ydSize", 
                Arrays.<Type>asList(), 
                Arrays.<TypeReference<?>>asList(new TypeReference<Uint256>() {}));
        return executeCallSingleValueReturnAsync(function);
    }

    public Future<List<Type>> rcMap(Uint256 param0) {
        Function function = new Function("rcMap", 
                Arrays.<Type>asList(param0), 
                Arrays.<TypeReference<?>>asList(new TypeReference<Utf8String>() {}, new TypeReference<Utf8String>() {}, new TypeReference<Uint256>() {}));
        return executeCallMultipleValueReturnAsync(function);
    }

    public Future<Uint256> rcSize() {
        Function function = new Function("rcSize", 
                Arrays.<Type>asList(), 
                Arrays.<TypeReference<?>>asList(new TypeReference<Uint256>() {}));
        return executeCallSingleValueReturnAsync(function);
    }

    public Future<Uint256> state() {
        Function function = new Function("state", 
                Arrays.<Type>asList(), 
                Arrays.<TypeReference<?>>asList(new TypeReference<Uint256>() {}));
        return executeCallSingleValueReturnAsync(function);
    }

    public Future<List<Type>> ydMap(Uint256 param0) {
        Function function = new Function("ydMap", 
                Arrays.<Type>asList(param0), 
                Arrays.<TypeReference<?>>asList(new TypeReference<Utf8String>() {}, new TypeReference<Utf8String>() {}, new TypeReference<Uint256>() {}, new TypeReference<Uint256>() {}));
        return executeCallMultipleValueReturnAsync(function);
    }

    public Future<TransactionReceipt> geneTs(Utf8String _code, Utf8String _carNo, Uint256 _weight) {
        Function function = new Function("geneTs", Arrays.<Type>asList(_code, _carNo, _weight), Collections.<TypeReference<?>>emptyList());
        return executeTransactionAsync(function);
    }

    public static Future<LOrder> deploy(Web3j web3j, Credentials credentials, BigInteger gasPrice, BigInteger gasLimit, BigInteger initialWeiValue, Utf8String _myCode, Uint256 _fee, Utf8String _goods, Uint256 _weight, Address _from, Address _to, Address _go, Utf8String _wlCode) {
        String encodedConstructor = FunctionEncoder.encodeConstructor(Arrays.<Type>asList(_myCode, _fee, _goods, _weight, _from, _to, _go, _wlCode));
        return deployAsync(LOrder.class, web3j, credentials, gasPrice, gasLimit, BINARY, encodedConstructor, initialWeiValue);
    }

    public static Future<LOrder> deploy(Web3j web3j, TransactionManager transactionManager, BigInteger gasPrice, BigInteger gasLimit, BigInteger initialWeiValue, Utf8String _myCode, Uint256 _fee, Utf8String _goods, Uint256 _weight, Address _from, Address _to, Address _go, Utf8String _wlCode) {
        String encodedConstructor = FunctionEncoder.encodeConstructor(Arrays.<Type>asList(_myCode, _fee, _goods, _weight, _from, _to, _go, _wlCode));
        return deployAsync(LOrder.class, web3j, transactionManager, gasPrice, gasLimit, BINARY, encodedConstructor, initialWeiValue);
    }

    public static LOrder load(String contractAddress, Web3j web3j, Credentials credentials, BigInteger gasPrice, BigInteger gasLimit) {
        return new LOrder(contractAddress, web3j, credentials, gasPrice, gasLimit);
    }

    public static LOrder load(String contractAddress, Web3j web3j, TransactionManager transactionManager, BigInteger gasPrice, BigInteger gasLimit) {
        return new LOrder(contractAddress, web3j, transactionManager, gasPrice, gasLimit);
    }
}
